<?php
class Application_Model_Mail{
	private $_id;
	private $_author;
	private $_pseudo;
	private $_object;
	private $_date;
	private $_text;
	private $_read;

	public function __construct(){

	}
	public function __set($name, $value){
		$method = 'set'.$name;
		if(($name == 'mapper') || !method_exists($this, $method)){
			throw new Exception('Invalid mail property');
		}
		$this->$method($value);
	}
	public function __get($name){
		$method = 'get'.$name;
		if(($name=='mapper')||!method_exists($this, $method)){
			throw new Exception('Invalid mail property');
		}
		return $this->$method();
	}
	public function getId(){
		return $this->_id;
	}
	public function setId($id){
		$this->_id = $id;
		return $this;
	}
	public function getAuthor(){
		return $this->_author;
	}
	public function setAuthor($aut){
		$this->_author = $aut;
		return $this;
	}
	public function getPseudo(){
		return $this->_pseudo;
	}
	public function setPseudo($pseudo){
		$this->_pseudo = $pseudo;
		return $this;
	}
	public function getObject(){
		return $this->_object;
	}
	public function setObject($obj){
		$this->_object = $obj;
		return $this;
	}
	public function getDate(){
		return $this->_date;
	}
	public function setDate($date){
		$this->_date = new Zend_Date($date,Zend_Date::ISO_8601);
		return $this;
	}
	public function getText(){
		return $this->_text;
	}
	public function setText($text){
		$this->_text = $text;
		return $this;
	}
	public function isRead(){
		return $this->_read;
	}
	public function setRead($read){
		$this->_read = $read;
		return $this;
	}
}